package org.example.service.impl;

import org.example.dao.PaymentDao;
import org.example.pojo.Payment;
import org.example.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
//@SuppressWarnings("all") //压制警告
public class PaymentServiceImpl implements PaymentService {
    @Autowired(required = false)
    PaymentDao paymentDao;

    //添加订单
    @Override
    public int create(Payment payment) {
        return paymentDao.create(payment);
    }

    //查询订单
    @Override
    public Payment findPaymentById(long id) {
        return paymentDao.findPaymentById(id);
    }
}
